﻿using Microsoft.AspNetCore.Mvc;

namespace ThreeTeams.API.Controllers
{
    public class ImageController : Controller
    {
        [HttpPost("Files")]
        public async Task<dynamic> Files(IFormFile file)
        {
            var res = "wwwroot/File/" + file.FileName;
            using (FileStream fs = new FileStream(res, FileMode.OpenOrCreate))
            {
                file.CopyTo(fs);
            }
            return ("http://localhost:5118/File/" + file.FileName);
        }
    }
}
